﻿namespace eBdb.EpubReader
{
    using System;

    public class DateData
    {
        public string Type { get; private set; }

        public DateTime Date { get; private set; }

        public DateData(string date)
            : this(date, string.Empty)
        {
        }

        public DateData(string date, string type)
        {
            Type = type;
            Date = DateTime.Parse(date);

            if (string.IsNullOrEmpty(Type))
            {
                Type = "Publish Date";
            }
        }
    }
}
